#ifndef ACTIONWAIT_H
#define ACTIONWAIT_H

#include "iaction.h"
//睡眠等待

class ActionWait : public IAction
{
public:
    ActionWait();
    void setWaitMs(int ms);
    void setBackAction(IAction* act);

    //如果指定act，actionNext(1)=act. 睡眠完成后，返回1，所以不用显式设置next
    ActionWait(int ms, IAction* act=NULL);
    int execute();

private:
    int ms_;
    IAction* back_;
};

#endif // ACTIONWAIT_H
